// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity;

import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.nnee.p_fk.cls_ActivityEx;
import com.nnee.p_fk.cls_k;
import com.nnee.p_pr.p_a.cls_i;
import com.nnee.p_pr.p_activity.p_a.cls_t;
import com.nnee.p_pr.p_activity.p_view.cls_NeteaseListView;
import com.nnee.p_pr.p_app.cls_PrisApp;
import com.nnee.p_pr.p_atom.cls_u;
import com.nnee.p_pr.cls_b;
import com.nnee.p_pr.p_b.cls_a;
import com.nnee.p_pr.p_d.cls_c;
import com.nnee.p_pr.p_prot.cls_d;
import com.nnee.p_pr.cls_v;
import java.util.Iterator;
import java.util.LinkedList;

// Referenced classes of package com.nnee.p_pr.p_activity:
//            bh, bg, bf, bm, 
//            bk, bi, dc

public class cls_FavoriteListActivity extends cls_ActivityEx
{

    public cls_FavoriteListActivity()
    {
        l = true;
        m = false;
        n = 0;
        o = 0;
        p = null;
        q = null;
        r = null;
        s = null;
        t = null;
        u = null;
        v = null;
        w = null;
        x = null;
        y = null;
        z = null;
        f = new cls_bh(this);
        g = new cls_bg(this);
        E = new cls_bf(this);
        h = new cls_bm(this);
        i = new cls_bk(this);
        j = new cls_bi(this);
    }

    static int a(cls_FavoriteListActivity favoritelistactivity)
    {
        return favoritelistactivity.o;
    }

    static int a(cls_FavoriteListActivity favoritelistactivity, int i1)
    {
        favoritelistactivity.o = i1;
        return i1;
    }

    static cls_d a(cls_FavoriteListActivity favoritelistactivity, cls_d d1)
    {
        favoritelistactivity.r = d1;
        return d1;
    }

    static String a(cls_FavoriteListActivity favoritelistactivity, String s1)
    {
        favoritelistactivity.p = s1;
        return s1;
    }

    private void a(int i1, Object obj, String s1, String s2)
    {
        switch(i1){
        case 500:
        	 n = com.nnee.p_pr.cls_v.a().j();
        	break;
        case 502:
        	n = com.nnee.p_pr.cls_v.a().e((cls_u)obj);
        	break;
        case 504:
        	n = com.nnee.p_pr.cls_v.a().d(s1);
        	break;
        case 505:
        	n = com.nnee.p_pr.cls_v.a().l();
        	break;
        case 501:
        case 503:
        default:
        	break;
        }
        
    }

    public static void a(Context context)
    {
        context.startActivity(new Intent(context, com.nnee.p_pr.p_activity.cls_FavoriteListActivity.class));
    }

    static void a(cls_FavoriteListActivity favoritelistactivity, int i1, Object obj, String s1, String s2)
    {
        favoritelistactivity.a(i1, obj, s1, s2);
    }

    static void a(cls_FavoriteListActivity favoritelistactivity, cls_d d1, boolean flag)
    {
        favoritelistactivity.a(d1, flag);
    }

    static void a(cls_FavoriteListActivity favoritelistactivity, boolean flag)
    {
        favoritelistactivity.b(flag);
    }

    private void a(cls_d d1, boolean flag)
    {
        if(d1 != null && d1.h != null && w != null && (w instanceof cls_t))
            if(!flag)
            {
                ((cls_t)w).a();
                ((cls_t)w).b(d1.h);
            } else
            {
                ((cls_t)w).a(d1.h);
            }
    }

    static BaseAdapter b(cls_FavoriteListActivity favoritelistactivity)
    {
        return favoritelistactivity.w;
    }

    private void b(boolean flag)
    {
        if(flag)
        {
            B.setVisibility(0);
            C.setVisibility(0);
            D.setText(0x7f0a009d);
        } else
        {
            B.setVisibility(8);
        }
    }

    static Context c(cls_FavoriteListActivity favoritelistactivity)
    {
        return favoritelistactivity.s;
    }

    private void c()
    {
        t = (ImageView)findViewById(0x7f0d0008);
        z = (ProgressBar)findViewById(0x7f0d000c);
        v = (cls_NeteaseListView)findViewById(0x7f0d0081);
        u = (LinearLayout)findViewById(0x7f0d0083);
        A = LayoutInflater.from(this).inflate(0x7f030008, null);
        v.addFooterView(A);
        v.setDivider(null);
        v.setDividerHeight(0);
        v.setFooterDividersEnabled(false);
        B = (LinearLayout)A.findViewById(0x7f0d001a);
        C = (ProgressBar)A.findViewById(0x7f0d001b);
        D = (TextView)A.findViewById(0x7f0d001c);
    }

    static String d(cls_FavoriteListActivity favoritelistactivity)
    {
        return favoritelistactivity.q;
    }

    private void e()
    {
        setTitle(0x7f0a007b);
        c(com.nnee.p_fk.cls_k.a(this).b(0x7f02013a));
        q = getResources().getString(0x7f0a007b);
    }

    static void e(cls_FavoriteListActivity favoritelistactivity)
    {
        favoritelistactivity.s();
    }

    private void f()
    {
        String as[] = new String[5];
        as[0] = "icon";
        as[1] = "title";
        as[2] = "time";
        as[3] = "content";
        as[4] = "line";
        int ai[] = new int[5];
        ai[0] = 0x7f0d0024;
        ai[1] = 0x7f0d0018;
        ai[2] = 0x7f0d0104;
        ai[3] = 0x7f0d007d;
        ai[4] = 0x7f0d0017;
        w = new cls_t(this, 0x7f030046, as, ai);
        if(v != null)
            v.setAdapter(w);
    }

    static void f(cls_FavoriteListActivity favoritelistactivity)
    {
        favoritelistactivity.u();
    }

    private void g()
    {
        if(t != null)
            t.setOnClickListener(g);
        if(v != null)
        {
            v.setOnItemClickListener(E);
            v.setOnItemLongClickListener(h);
            v.setOnScrollListener(i);
        }
    }

    static void g(cls_FavoriteListActivity favoritelistactivity)
    {
        favoritelistactivity.r();
    }

    static LinkedList h(cls_FavoriteListActivity favoritelistactivity)
    {
        return favoritelistactivity.x;
    }

    private void h()
    {
        a(505, null, null, null);
    }

    static View i(cls_FavoriteListActivity favoritelistactivity)
    {
        return favoritelistactivity.A;
    }

    static cls_NeteaseListView j(cls_FavoriteListActivity favoritelistactivity)
    {
        return favoritelistactivity.v;
    }

    static cls_d k(cls_FavoriteListActivity favoritelistactivity)
    {
        return favoritelistactivity.r;
    }

    static LinearLayout l(cls_FavoriteListActivity favoritelistactivity)
    {
        return favoritelistactivity.u;
    }

    static String m(cls_FavoriteListActivity favoritelistactivity)
    {
        return favoritelistactivity.p;
    }

    static LinkedList n(cls_FavoriteListActivity favoritelistactivity)
    {
        return favoritelistactivity.y;
    }

    private void r()
    {
        a(500, null, null, null);
    }

    private void s()
    {
        a(502, (cls_u)w.getItem(o), null, null);
    }

    private void t()
    {
        if(com.nnee.p_pr.p_a.cls_i.a(com.nnee.p_pr.p_b.cls_a.o(), 20, 20))
            com.nnee.p_pr.p_activity.cls_dc.b(s, 2);
    }

    private void u()
    {
        if(p != null)
        {
            a(504, null, p, null);
            v.addFooterView(A);
            d_();
            b(true);
        }
    }

    public void b()
    {
        t.setVisibility(0);
        z.setVisibility(8);
    }

    public void d_()
    {
        t.setVisibility(8);
        z.setVisibility(0);
    }

    public void onCreate(Bundle bundle)
    {
        super.onCreate(bundle);
        setContentView(0x7f030029);
        s = this;
        l = true;
        com.nnee.p_pr.cls_v.a().a(j);
        m = com.nnee.p_b.p_a.cls_d.h().i();
        x = new LinkedList();
        y = new LinkedList();
        c();
        f();
        g();
        e();
        h();
        d_();
        if(m)
            t();
    }

    public Dialog onCreateDialog(int i1)
    {
        cls_u u1 = (cls_u)w.getItem(o);
        String s1;
        android.app.AlertDialog.Builder builder;
        Object obj;
        if(u1 != null)
            s1 = u1.U();
        else
            s1 = null;
        switch(i1)
        {
        case 1:
        	builder = new android.app.AlertDialog.Builder(this);
            builder.setTitle(s1);
            builder.setItems(0x7f070005, f);
            obj = builder.create();
        	break;
        default:
        	 obj = null;
        	break;
        }
        return ((Dialog) (obj));
        
    }

    public boolean onCreateOptionsMenu(Menu menu)
    {
        getMenuInflater().inflate(0x7f0c0001, menu);
        return super.onCreateOptionsMenu(menu);
    }

    public void onDestroy()
    {
        super.onDestroy();
        com.nnee.p_pr.cls_v.a().b(j);
        if(z != null)
            z.setVisibility(8);
        if(C != null)
            C.setVisibility(8);
        if(x != null)
            x.clear();
        if(y != null)
            y.clear();
        cls_PrisApp.a().b(null);
    }

    public boolean onKeyDown(int i1, KeyEvent keyevent)
    {
        if(i1 == 4)
            com.nnee.p_pr.p_d.cls_c.a(p(), 624);
        return super.onKeyDown(i1, keyevent);
    }

    public boolean onOptionsItemSelected(MenuItem menuitem)
    {
        switch(menuitem.getItemId()){
        case 2131558722:
        	a(500, null, null, null);
            d_();
            com.nnee.p_pr.p_d.cls_c.a(p(), 625);
        	break;
        	default:
        		
        		break;
        }
        return super.onOptionsItemSelected(menuitem);
        
    }

    public void onPrepareDialog(int i1, Dialog dialog)
    {
        cls_u u1 = (cls_u)w.getItem(o);
        String s1;
        if(u1 != null)
            s1 = u1.U();
        else
            s1 = null;
        switch(i1){
        case 1:
        	 dialog.setTitle(s1);
        	break;
        default:
    		
    		break;
        } 
    }

    public void onResume()
    {
        super.onResume();
        Iterator iterator = y.iterator();
        do
        {
            if(!iterator.hasNext())
                break;
            cls_u u1 = (cls_u)iterator.next();
            if(r != null)
            {
                r.h.remove(u1);
                ((cls_t)w).d(u1);
            }
        } while(true);
        y.clear();
        if(l)
            l = false;
        else
        if(w.getCount() == 0)
            u.setVisibility(0);
        else
            u.setVisibility(8);
    }

    public static final int a = 0;
    public static final int b = 1;
    public static final int c = 1;
    public static final int d = 0;
    public static final int e = 1;
    private static final String k = "FavoriteListActivity";
    private View A;
    private LinearLayout B;
    private ProgressBar C;
    private TextView D;
    private android.widget.AdapterView.OnItemClickListener E;
    android.content.DialogInterface.OnClickListener f;
    android.view.View.OnClickListener g;
    android.widget.AdapterView.OnItemLongClickListener h;
    android.widget.AbsListView.OnScrollListener i;
    cls_b j;
    private boolean l;
    private boolean m;
    private int n;
    private int o;
    private String p;
    private String q;
    private cls_d r;
    private Context s;
    private ImageView t;
    private LinearLayout u;
    private cls_NeteaseListView v;
    private BaseAdapter w;
    private LinkedList x;
    private LinkedList y;
    private ProgressBar z;
}
